<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="./Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="./Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="./Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="./Public/Admin/Flat/img/favicon.ico">
	   	
	</head>
	<body>
		<form action="{{U('add',array('gid'=>$_GET['gid'],'tid'=>$_GET['tid']))}}" method="post">
			<table class="table table-hover">
			<tr class="active">
			<th>货品ID</th>
			{{foreach from = "$typedata" key="$k" value="$v"}}
			<th>{{$v['ta_name']}}</th>
			{{endforeach}}
		    <th>库存</th>
			<th>货号</th>
			 <th width="210">操作</th>
			</tr>
		{{foreach from="$olddata" key="$k" value="$v"}}
			<tr>
			<td>{{$v['gl_id']}}</td>
			{{foreach from="$v['gl_combine']" key="$kk" value="$vv"}}
			<td>{{$vv['ga_value']}}</td>
			{{endforeach}}
				
			<td>{{$v['gl_inventory']}}</td>
			<td>{{$v['gl_number']}}</td>
			
			<td>
		<a href="{{U('edit',array('glid'=>$v['gl_id'],'gid'=>$_GET['gid'],'tid'=>$_GET['tid']))}}" class="btn btn-sm btn-warning">编辑</a>
		<a href="{{U('del',array('glid'=>$v['gl_id'],'gid'=>$_GET['gid'],'tid'=>$_GET['tid']))}}" class="btn btn-sm btn-danger">删除</a>
		</td>
			</tr>
			{{endforeach}}
	<tr>
		<td>添加货品</td>
		{{foreach from = "$typedata" key="$k" value="$v"}}
		<td>
		<select name="gl_combine[]"><option value="">--请选择--</option>
		{{foreach from="$v['select']" key="$key" value="$value"}}
			
			<option value="{{$value['ga_id']}}">{{$value['ga_value']}}</option>
		{{endforeach}}
		</select>
		</td>
		{{endforeach}}
		<td><input type="text" value="" name="gl_inventory" placeholder="请输入库存"/></td>
		<td><input type="text" name="gl_number" value="" placeholder="请输入货号"/></td>
	 <td></td>
	</tr>
		</table>
		<input type="hidden" name="gl_gid" id="" value="{{$_GET['gid']}}" />
		<input type="submit" value="确认添加" class="hd-btn hd-btn-success" style="height: 40px;"/>
		
		<style type="text/css">
			.page li{
				margin-right: 0;
			}
		</style>
		<center>
			<div class="page pagination">
				<ul>
					{{$page}}
				</ul>
			</div>
		</center>
	</form></body>
</html>
